﻿@model Models.WebSite_HaiSheng.Image
           
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@Html.ValidationSummary(true)
<fieldset>
    <legend>图片</legend>
    <div class="editor-label">
        @Html.LabelFor(model => model.ImageName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.ImageName)
        @Html.ValidationMessageFor(model => model.ImageName)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.ImageUrl)
    </div>
    <div class="editor-field">
        @{if (Model != null)
          {
              @Html.HiddenFor(m=>m.ImageUrl)
              <img  alt="上传文件" width="300" height="200" src=@Model.ImageUrl />
          }
        }
        @Html.Telerik().Upload().Async(a=>a.AutoUpload(true)).Name("attachments").Multiple(false)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Description)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Description)
        @Html.ValidationMessageFor(model => model.Description)
    </div>
    <div class="editor-label">
        @Html.LabelFor(model => model.Sequence)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Sequence)
        @Html.ValidationMessageFor(model => model.Sequence)
    </div>
    <p>
        <input type="submit" value="保存" />
    </p>
</fieldset>
